Conversation
|
This is not working yet, I think I need some pair programming with you , it's getting complicated for me to understand what should I do |
lib/redis/redis.ts
Outdated
| await (async function () { | ||
| for await (const {channel, message} of subscribe.receive()) { | ||
| console.log({channel, message:message}) | ||
| } | ||
| })(); |
There was a problem hiding this comment.
Doesn't this do the job? Since the parent function is already defined as async.
| await (async function () { | |
| for await (const {channel, message} of subscribe.receive()) { | |
| console.log({channel, message:message}) | |
| } | |
| })(); | |
| for await (const {channel, message} of subscribe.receive()) { | |
| console.log({channel, message:message}) | |
| } |
lib/redis/redis.ts
Outdated
| export const addTaskToRedis = async (task:Task)=>{ | ||
| return publish(task.name, task) | ||
| } |
There was a problem hiding this comment.
IMO, this module should not know anything about tasks. It should be concerned with saving and receiving data from Redis. We need another module/package to handle connecting to tasks. WDYT?
There was a problem hiding this comment.
You are right, I should separate the concerns
|
Sorry for commenting on a WIP PR. Just wanted to apply the changes in the meanwhile if you agree. Thanks @mohammadranjbarz . |
|
|
@jamiri |
No description provided.